home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / PInterfaces / Video.p < prev    next >
Encoding:
Text File  |  1989-10-13  |  4.5 KB  |  146 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Tuesday, October 25, 1988 at 12:10 PM
  3.     Video.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.     Copyright Apple Computer, Inc.    1986-1988
  7.     All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT Video;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingVideo}
  21. {$SETC UsingVideo := 1}
  22.  
  23. {$I+}
  24. {$SETC VideoIncludes := UsingIncludes}
  25. {$SETC UsingIncludes := 1}
  26. {$IFC UNDEFINED UsingQuickdraw}
  27. {$I $$Shell(PInterfaces)Quickdraw.p}
  28. {$ENDC}
  29. {$SETC UsingIncludes := VideoIncludes}
  30.  
  31. CONST
  32. mBaseOffset = 1;            {Id of mBaseOffset.}
  33. mRowBytes = 2;                {Video sResource parameter Id's }
  34. mBounds = 3;                {Video sResource parameter Id's }
  35. mVersion = 4;                {Video sResource parameter Id's }
  36. mHRes = 5;                    {Video sResource parameter Id's }
  37. mVRes = 6;                    {Video sResource parameter Id's }
  38. mPixelType = 7;             {Video sResource parameter Id's }
  39. mPixelSize = 8;             {Video sResource parameter Id's }
  40. mCmpCount = 9;                {Video sResource parameter Id's }
  41. mCmpSize = 10;                {Video sResource parameter Id's }
  42. mPlaneBytes = 11;            {Video sResource parameter Id's }
  43. mVertRefRate = 14;            {Video sResource parameter Id's }
  44. mVidParams = 1;             {Video parameter block id.}
  45. mTable = 2;                 {Offset to the table.}
  46. mPageCnt = 3;                {Number of pages}
  47. mDevType = 4;                {Device Type}
  48. oneBitMode = 128;            {Id of OneBitMode Parameter list.}
  49. twoBitMode = 129;            {Id of TwoBitMode Parameter list.}
  50. fourBitMode = 130;            {Id of FourBitMode Parameter list.}
  51. eightBitMode = 131;         {Id of EightBitMode Parameter list.}
  52. cscReset = 0;                {Control Codes}
  53. cscSetMode = 2;             {Control Codes}
  54. cscSetEntries = 3;            {Control Codes}
  55. cscGrayPage = 5;
  56. cscSetGray = 6;
  57. cscGetMode = 2;             {Status Codes}
  58. cscGetEntries = 3;            {Status Codes}
  59. cscGetPageCnt = 4;            {Status Codes}
  60. cscGetPageBase = 5;         {Status Codes}
  61.  
  62.  
  63. TYPE
  64.  
  65. VPBlockPtr = ^VPBlock;
  66. VPBlock = RECORD
  67.     vpBaseOffset: LONGINT;    {Offset to page zero of video RAM (From minorBaseOS).}
  68.     vpRowBytes: INTEGER;    {Width of each row of video memory.}
  69.     vpBounds: Rect;         {BoundsRect for the video display (gives dimensions).}
  70.     vpVersion: INTEGER;     {PixelMap version number.}
  71.     vpPackType: INTEGER;
  72.     vpPackSize: LONGINT;
  73.     vpHRes: LONGINT;        {Horizontal resolution of the device (pixels per inch).}
  74.     vpVRes: LONGINT;        {Vertical resolution of the device (pixels per inch).}
  75.     vpPixelType: INTEGER;    {Defines the pixel type.}
  76.     vpPixelSize: INTEGER;    {Number of bits in pixel.}
  77.     vpCmpCount: INTEGER;    {Number of components in pixel.}
  78.     vpCmpSize: INTEGER;     {Number of bits per component}
  79.     vpPlaneBytes: LONGINT;    {Offset from one plane to the next.}
  80.     END;
  81.  
  82. VDEntRecPtr = ^VDEntryRecord;
  83. VDEntryRecord = RECORD
  84.     csTable: Ptr;            {(long) pointer to color table entry=value, r,g,b:INTEGER}
  85.     END;
  86.  
  87. VDGrayPtr = ^VDGrayRecord;
  88. VDGrayRecord = RECORD
  89.     csMode: BOOLEAN;        {Same as GDDevType value (0=mono, 1=color)}
  90.     END;
  91.  
  92. { Parm block for SetGray control call }
  93. VDSetEntryPtr = ^VDSetEntryRecord;
  94. VDSetEntryRecord = RECORD
  95.     csTable: ^ColorSpec;    {Pointer to an array of color specs}
  96.     csStart: INTEGER;        {Which spec in array to start with, or -1}
  97.     csCount: INTEGER;        {Number of color spec entries to set}
  98.     END;
  99.  
  100. VDPgInfoPtr = ^VDPageInfo;
  101. VDPageInfo = RECORD
  102.     csMode: INTEGER;        {(word) mode within device}
  103.     csData: LONGINT;        {(long) data supplied by driver}
  104.     csPage: INTEGER;        {(word) page to switch in}
  105.     csBaseAddr: Ptr;        {(long) base address of page}
  106.     END;
  107.  
  108. VDSzInfoPtr = ^VDSizeInfo;
  109. VDSizeInfo = RECORD
  110.     csHSize: INTEGER;        {(word) desired/returned h size}
  111.     csHPos: INTEGER;        {(word) desired/returned h position}
  112.     csVSize: INTEGER;        {(word) desired/returned v size}
  113.     csVPos: INTEGER;        {(word) desired/returned v position}
  114.     END;
  115.  
  116. VDSettingsPtr = ^VDSettings;
  117. VDSettings = RECORD
  118.     csParamCnt: INTEGER;    {(word) number of params}
  119.     csBrightMax: INTEGER;    {(word) max brightness}
  120.     csBrightDef: INTEGER;    {(word) default brightness}
  121.     csBrightVal: INTEGER;    {(word) current brightness}
  122.     csCntrstMax: INTEGER;    {(word) max contrast}
  123.     csCntrstDef: INTEGER;    {(word) default contrast}
  124.     csCntrstVal: INTEGER;    {(word) current contrast}
  125.     csTintMax: INTEGER;     {(word) max tint}
  126.     csTintDef: INTEGER;     {(word) default tint}
  127.     csTintVal: INTEGER;     {(word) current tint}
  128.     csHueMax: INTEGER;        {(word) max hue}
  129.     csHueDef: INTEGER;        {(word) default hue}
  130.     csHueVal: INTEGER;        {(word) current hue}
  131.     csHorizDef: INTEGER;    {(word) default horizontal}
  132.     csHorizVal: INTEGER;    {(word) current horizontal}
  133.     csHorizMax: INTEGER;    {(word) max horizontal}
  134.     csVertDef: INTEGER;     {(word) default vertical}
  135.     csVertVal: INTEGER;     {(word) current vertical}
  136.     csVertMax: INTEGER;     {(word) max vertical}
  137.     END;
  138.  
  139.  
  140. {$ENDC}    { UsingVideo }
  141.  
  142. {$IFC NOT UsingIncludes}
  143.     END.
  144. {$ENDC}
  145.  
  146.